package cn.wzvtc.inheritance_interface.usb;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Shiwei Xu
 * @date 2020/4/20
 */
public class Computer {

  List<Portable> devices;

  public Computer() {
    devices = new ArrayList<>();
    devices.add(new Disk());
    devices.add(new Mouse());
    for (Portable portable: devices) {
      portable.plug();
      portable.play();
    }
  }
}
